<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/page" prefix="public"%>
<public:pageControl classPath="app.portalbs.system.dict.type.DictTree"/>
<script language="javascript" >
 
/* 树点击处理 */
function dictTypeTree_onclick(tree,page){
	 
	 if(tree.treeNode.level == 1){			 
		 page.find("dictTypeTreeFrame").view.url = "mains/dictList.jsp?dict_par_id="+tree.treeNode.nodeID;		 
	 }else{			 
		 page.find("dictTypeTreeFrame").view.url = "";			 
	 }
	 
 }
 
 /* 树展示处理 */
 function dictTypeTree_show(tree,page,type){
	 
	 if(type == "add"){
		 
		 if(tree.treeNode.level == 0 ){
			 return true;
		 }else{
			 return false;
		 }
		 
	 }
	 
	 else if(type == "edit"){
		 if(tree.treeNode.level == 0 ){
			 return false;
		 }else{
			 return true;
		 }
	 }
	 
	 else if(type == "delete"){
		 return !tree.treeNode.isParent;
	 }
	 
	 else{			 
		 return true;		 
	 }
	 
 } 
 
 /* 弹窗 */
 function dictTypeTree_page(tree,page){
	 return {
		url : "DictTreeEdit.jsp",
	    width : "450px"
	 };
 }

</script>


